use Dosvid
go

alter table Candidates add CandidateTypeId int null
go

update Candidates set
  CandidateTypeId = 4
go

alter table Candidates alter column CandidateTypeId int not null
go

alter table Candidates add constraint FK_Candidates_Candidate_Types_CandidateTypeId 
      foreign key (CandidateTypeId) references Candidate_Types(Id)
go
